/*
 * startup.c
 *
 *  Created on: Dec 4, 2023
 *      Author: boen
 */

#include <platform.h>

/**
  * @brief
  * @param
  * @retval
  */
void xbot_startup(void)
{
	printf(" \r\n");
	printf("+==============================+\r\n");
	printf("|                              |\r\n");
	printf("|           hfut xbot          |\r\n");
	printf("|                              |\r\n");
	printf("+==============================+\r\n");
	printf("[start-up]	3 sec.\r\n");
	HAL_Delay(1000u);
	printf("[start-up]	2 sec.\r\n");
	HAL_Delay(1000u);
	printf("[start-up]	1 sec.\r\n");
	HAL_Delay(1000u);
	printf("[chip]:	id	0x%04lx%04lx.\r\n", HAL_GetREVID(), HAL_GetDEVID());
	printf("[chip]:	freq	%ld Mhz.\r\n", HAL_RCC_GetSysClockFreq()/1000000u);
	printf("[lib]:	stm32f4xx(%08lx)\r\n", HAL_GetHalVersion());
	printf("[os]:	freeRTOS(%s)\r\n", tskKERNEL_VERSION_NUMBER);
	printf("[os]:	sw(%s) hw(Ros Robot Controller V1.0)\r\n", sw_ver);

	HAL_TIM_Base_Start_IT(&SYS_TICK_TIM);					// 启动任务TICK定时器(1ms时基)
	HAL_ADC_Start(&ADC_PORT_PWR);						    // 启动电量检测功能
}
